import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Scanner;

/**
 * @author:cai
 * @date:2022-05-17-10:12
 */
public class main {
    public static void main(String[] args) throws IOException {
        File file=new File("H://date/");
        if(!file.exists()){//如果文件夹不存在
            file.mkdir();//创建文件夹
        }

        System.out.println("1.编写日记");
        System.out.println("2.查看日记");
        Scanner sc = new Scanner(System.in);
        int in = sc.nextInt();
        while (in != 0) {
            if (in == 1) {
                File_name file_name = new File_name();
                file_name.setInfo();
                System.out.println(file_name.name);
                new write();
                write.File_write();
            } else if (in == 2) {
                new read();
                read.File_read();
            }
            in=sc.nextInt();
        }
    }
}
